% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math}
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
  hidelinks,
  pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
\usepackage{longtable,booktabs}
% Correct order of tables after \paragraph or \subparagraph
\usepackage{etoolbox}
\makeatletter
\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
\makeatother
% Allow footnotes in longtable head/foot
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
\makesavenoteenv{longtable}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering

\author{Bowen, Dmitriev, Galperti}
\date{\today}

\begin{document}

\hypertarget{template-readme-and-guidance}{%
\section{README file for replication of Figure IV}}

\hypertarget{overview}{%
\subsection{Overview}\label{overview}}

This series of code reproduces Figure IV in the manuscript ``Learning from Shared News: When Abundant Information Leads to Belief Polarization.'' The figure is a replication of the graph titled ``View That Effects of Global Warming Have Already Begun'' from the Gallup article ``Global Warming Attitudes Frozen Since 2016,'' published in April 5, 2021, using Stata and R.  A link to the article is provided here (\hyperlink{here}{https://news.gallup.com/poll/343025/global-warming-attitudes-frozen-2016.aspx}). \par

Two main files run all of the code needed to replicate both data cleaning and graph generation, ``\texttt{Code/1. gallup\_rep\_code\_1997convert.R}'' and ``\texttt{Code/2. gallup\_rep\_code\_master.do}.''

\hypertarget{data-availability-and-provenance-statements}{%
\subsection{Data Availability and Provenance
Statements}\label{data-availability-and-provenance-statements}}

\begin{itemize}
\tightlist
\item[$\square$]
  This paper does not involve analysis of external data (i.e., no data
  are used or the only data are generated by the authors via simulation
  in their code).
\end{itemize}

Two main datasets are used for this replication. The first is restricted access Gallup poll data from November 6-9, 1997 downloaded from the Roper Center's iPoll Database. The second is proprietary Gallup poll data from 2000-2021. More detail about the dates of data collection and data collection procedures can be found in a pdf included at bottom of the webpage of the original article and at the Gallup website.

\hypertarget{statement-about-rights}{%
\subsubsection{Statement about Rights}\label{statement-about-rights}}

\begin{itemize}
\tightlist
\item[$\text{\rlap{$\checkmark$}}\square$]
  I certify that the author(s) of the manuscript have legitimate access
  to and permission to use the data used in this manuscript.
\item[$\text{\rlap{$\checkmark$}}\square$]
  I certify that the author(s) of the manuscript have documented
  permission to redistribute/publish the data contained within this
  replication package. Appropriate permission are documented in the
  \href{https://social-science-data-editors.github.io/template_README/LICENSE.txt}{LICENSE.txt}
  file.
\end{itemize}

\hypertarget{summary-of-availability}{%
\subsubsection{Summary of Availability}\label{summary-of-availability}}

\begin{itemize}
\tightlist
\item[$\square$]
  All data \textbf{are} publicly available.
\item[$\square$]
  Some data \textbf{cannot be made} publicly available.
\item[$\text{\rlap{$\checkmark$}}\square$]
  \textbf{No data can be made} publicly available.
\end{itemize}

\pagebreak
\hypertarget{details-on-each-data-source}{%
\subsubsection{Details on each Data
Source}\label{details-on-each-data-source}}

\hypertarget{example-for-public-use-data-sourced-from-elsewhere-and-provided}{%
\subsubsection{1997 Gallup Poll Data}}

\begin{quote}
The paper uses Gallup Poll data downloaded from the Roper Center iPoll database. The data were collected from November 6-9, 1997, and can be found under the title ``Gallup News Service Poll: Ethical Standards/Abortion/Environment'' (Gallup Organization [1997]). The data and questions can be downloaded from the following link: \hyperlink{roper}{https://ropercenter.cornell.edu/ipoll/study/31088755/}. Institutional access to the dataset is made available to select universities and organizations. Dataset access is also available through membership registration with the Roper Center.
\end{quote}

\hypertarget{example-for-confidential-data}{%
\subsubsection{2000-2021 Gallup Poll Data}}

\begin{quote}
The data from Gallup to replicate the 2000-2021 part of the time series are confidential, but may be obtained through requests with the Gallup Organization directly (Gallup Organization [2000-2021]).
\end{quote}

\hypertarget{dataset-list}{%
\subsection{Dataset list}\label{dataset-list}}

\begin{table}[h!]
	\centering
	\begin{tabular}{p{3cm} p{3cm} p{3cm} l} \hline
		Data file & Source & Notes & Provided \\ \hline
		\texttt{9711028.por} & Gallup & As per terms of use & No \\
		\texttt{GPSS Environment Final GA Aggregate.dta} & Gallup & Confidential & No \\ \hline
	\end{tabular}
\end{table}

\hypertarget{computational-requirements}{%
\subsection{Computational
requirements}\label{computational-requirements}}

\hypertarget{software-requirements}{%
\subsubsection{Software Requirements}\label{software-requirements}}

\begin{itemize}
\tightlist
\item
R  4.1.1
\begin{itemize}
	\tightlist
	\item
	\texttt{haven} (2.5.1)
	\item
	the file ``\texttt{Code/1. gallup\_rep\_code\_1997convert.R}'' will install all R dependencies, and should be run once prior to running other programs.
\end{itemize}
\item
  Stata 17
  \begin{itemize}
  \tightlist
  \item all Stata programs can be run in Stata versions 14-17.
  \item
    the program ``\texttt{Code/2. gallup\_rep\_code\_master.do}'' will install all Stata dependencies locally, and should be run once.
  \end{itemize}
\end{itemize}

\hypertarget{summary}{%
\paragraph{Summary}\label{summary}}

Approximate time needed to reproduce the analyses on a standard 2022 desktop machine:

\begin{itemize}
\tightlist
\item[$\text{\rlap{$\checkmark$}}\square$]
  \textless10 minutes
\item[$\square$]
  10-60 minutes
\item[$\square$]
  1-2 hours
\item[$\square$]
  2-8 hours
\item[$\square$]
  8-24 hours
\item[$\square$]
  1-3 days
\item[$\square$]
  3-14 days
\item[$\square$]
  \textgreater{} 14 days
\item[$\square$]
  Not feasible to run on a desktop machine, as described below.
\end{itemize}

\hypertarget{details}{%
\paragraph{Details}\label{details}}

The code was last run on a \textbf{4-core Intel-based laptop with Windows 11 Home version 10.0.22621}.

\hypertarget{description-of-programscode}{%
\subsection{Description of
programs/code}\label{description-of-programscode}}

\begin{itemize}
\tightlist
\item
  Programs in ``\texttt{Code/1. gallup\_rep\_code\_1997convert.R}'' will convert the 1997 Gallup data from portable SPSS (\texttt{.por}) to Stata 14 format (\texttt{.dta}).
\item
  Programs in ``\texttt{Code/2. gallup\_rep\_code\_master.do}'' runs the two program files below.
\item 
  Programs in ``\texttt{Code/3. gallup\_rep\_code\_1997cleaning.do}'' cleans the 1997 Gallup data. 
\item 
  Programs in ``\texttt{Code/4. gallup\_rep\_code\_19972021.do}'' cleans the 2000-2021 data, brings in the 1997 data, and generates the Gallup graph. The output file is called \texttt{High-res simulations graphs/global\_warming\_gallup.png} and should be easy to correlate with the manuscript.
\end{itemize}

\hypertarget{instructions-to-replicators}{%
\subsection{Instructions to
Replicators}\label{instructions-to-replicators}}

\begin{itemize}
\tightlist
\item 
  Obtain the relevant data from both the Roper Center (in portable SPSS format) and Gallup (in Stata format). Download to the prepared \texttt{Data/} subdirectory.
\item
  Edit ``\texttt{Code/1. gallup\_rep\_code\_1997convert.R}'' to adjust the default root directory, user name, and path (if needed).
\item
  Run ``\texttt{Code/1. gallup\_rep\_code\_1997convert.R}'' to convert the 1997 Gallup data from portable SPSS (\texttt{.por}) to Stata 14 format (\texttt{.dta}).
\item
  Edit ``\texttt{Code/2. gallup\_rep\_code\_master.do}'' to adjust the default root directory, user name, and path (if needed).
\item
  Run ``\texttt{Code/2. gallup\_rep\_code\_master.do}'' to clean the 1997 data, clean the 2000-2021 data, append the 1997 data, and then generate the Gallup graph.
\end{itemize}

\hypertarget{list-of-tables-and-programs}{%
\subsection{List of tables and
programs}\label{list-of-tables-and-programs}}

The provided code reproduces:

\begin{itemize}
\tightlist
\item[$\square$]
  All numbers provided in text in the paper
\item[$\square$]
  All tables and figures in the paper
\item[$\text{\rlap{$\checkmark$}}\square$]
  Selected tables and figures in the paper, as explained and justified
  below.
\end{itemize}

\begin{table}[h!]
	\centering
	\begin{tabular}{p{1.5cm} p{4.5cm} p{4.2cm} p{2.5cm}} \hline
		Figure & Program & Output file & Note \\ \hline
		Figure IV & \texttt{Code/2. gallup\_rep\_code\_master.do} & \texttt{High-res simulations graphs/ global\_warming\_gallup.png} & Requires confidential data \\ \hline
	\end{tabular}
\end{table}

\hypertarget{references}{%
\subsection{References}\label{references}}

Gallup Organization, Gallup News Service Poll: Ethical Standards/Abortion/Environment, Gallup Organization, (Cornell University, Ithaca, NY: Roper Center for Public Opinion Research, 1997), Dataset, DOI: 10.25940/ROPER-31088755.

Gallup Organization, Gallup Poll Social Series, Gallup Organization, (2000-2021), Dataset.

\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}

\end{document}
